package org.sjm.samples.model;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotEmpty;

public class ExamSubjectVO {

	private Integer subId;
	
	@NotEmpty( message = "不能为空")
	@Size(max = 45, message = "长度不能超过45个字符")
	private String name;
	
	@NotEmpty( message = "不能为空")
	private String description;
	
	@NotEmpty( message = "不能为空")
	@Pattern(regexp = "^[0-9]*$", message = "必须是整数")
	@Size(max = 11, message = "长度不能超过11个字符")
	private String testCount;
	
	@NotEmpty( message = "不能为空")
	@Pattern(regexp = "^[0-9]*$", message = "必须是整数")
	@Size(max = 11, message = "长度不能超过11个字符")
	private String totalTime;// 考试总时长，单位（分钟）
	
	@NotEmpty( message = "不能为空")
	@Pattern(regexp = "^{0}|[0-9]+(.[0-9]{0,2})?$", message = "格式‘0.00’")
	@Size(max = 6, message = "长度不能超过6个字符")
	private String totalScore;//'0.00''满分总分'
	
	private String status;//'0:关闭\n1:开启'
	
	public ExamSubjectVO(){
		super();
	}

	public ExamSubjectVO(Integer subId, String name, String description, String testCount, String totalTime, String totalScore, String status){
		super();
		this.subId = subId;
		this.name = name;
		this.description = description;
		this.testCount = testCount;
		this.totalTime = totalTime;
		this.totalScore = totalScore;
		this.status = status;
	}
	
	public Integer getSubId() {
		return subId;
	}

	public void setSubId(Integer subId) {
		this.subId = subId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTestCount() {
		return testCount;
	}

	public void setTestCount(String testCount) {
		this.testCount = testCount;
	}

	public String getTotalTime() {
		return totalTime;
	}

	public void setTotalTime(String totalTime) {
		this.totalTime = totalTime;
	}

	public String getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(String totalScore) {
		this.totalScore = totalScore;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}
